package cn.blankm.video.tool;


/**
 * Copyright (C), 1999-2022
 * Author qfmeng@iflytek.com
 * Date 2022/5/28 13:13
 * <p>
 * Description: 防抖
 */
public class FastClickUtil {
//    private static final int MIN_DELAY_TIME = 1000;  // 两次点击间隔不能少于1000ms
    private static long lastClickTime;

    public static boolean isFastClick(int minDelayTime) {
        boolean flag = true;
        long currentClickTime = System.currentTimeMillis();
        if ((currentClickTime - lastClickTime) >= minDelayTime) {
            flag = false;
        }
        lastClickTime = currentClickTime;
        return flag;
    }
}
